package com.framework.modules.guild.service.impl;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.framework.modules.dataview.entity.ViewGuildMemberListEntity;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.common.utils.PageUtils;
import com.framework.common.utils.Query;

import com.framework.modules.guild.dao.GuildWithdrawHistoryDao;
import com.framework.modules.guild.entity.GuildWithdrawHistoryEntity;
import com.framework.modules.guild.service.GuildWithdrawHistoryService;


@Service("guildWithdrawHistoryService")
public class GuildWithdrawHistoryServiceImpl extends ServiceImpl<GuildWithdrawHistoryDao, GuildWithdrawHistoryEntity> implements GuildWithdrawHistoryService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Integer guildId = Integer.valueOf(params.getOrDefault("guild_id", "0").toString());
        Wrapper<GuildWithdrawHistoryEntity> wrapper = new EntityWrapper<GuildWithdrawHistoryEntity>()
                .eq(guildId > 0, "guild_id", guildId);

        Page<GuildWithdrawHistoryEntity> page = this.selectPage(
                new Query<GuildWithdrawHistoryEntity>(params).getPage(),
                wrapper
        );

        return new PageUtils(page);
    }

}
